package com.aconcagua.mvc.factory {
  import com.aconcagua.beans.BeanDefinitionException;
  
  public class CommandDefinitionException extends BeanDefinitionException {
    public static const ANONYMOUS_COMMAND: int = -1; 

    public function CommandDefinitionException() {
      super(null, ANONYMOUS_COMMAND);
    }
    
    override protected function resolveMessage(name:String, id:int): String {
      switch (id) {
        case ANONYMOUS_COMMAND: 
          return "Configuration problem: Command has no name";
        default: 
          return super.resolveMessage(name, id);
      }
    }
  }
}